<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title></title>
<link href='/meirongtest/Public/Member/css/global.css' rel='stylesheet' type='text/css' />
<link href='/meirongtest/Public/Member/css/main.css' rel='stylesheet' type='text/css' />
<link href='/meirongtest/Public/Member/css/mall.css' rel='stylesheet' type='text/css' />

<script type='text/javascript' src='/meirongtest/Public/Member/js/jquery-1.7.2.min.js'></script>
<script type='text/javascript' src='/meirongtest/Public/Member/js/global.js'></script>
<link href='/meirongtest/Public/Member/css/wechat.css' rel='stylesheet' type='text/css' />
<!--[if lte IE 9]><script src="__PUBIC__/Member/js/jquery.watermark-1.3.js"></script><![endif]-->
<script type='text/javascript' src='/meirongtest/Public/Member/js/wechat.js'></script>
<script type='text/javascript' src='/meirongtest/Public/Member/js/order.js'></script>
<script type="text/javascript" src="/meirongtest/Public/Member/js/operamasks-ui.min.js"></script>
<script type='text/javascript' src='/meirongtest/Public/Member/js/mall.js'></script>

<link href='/meirongtest/Public/Member/css/daterangepicker.css' rel='stylesheet' type='text/css' />
<script type='text/javascript' src='/meirongtest/Public/Member/js/moment.min.js'></script>
<script type='text/javascript' src='/meirongtest/Public/Member/js/daterangepicker.js'></script>

<!-- <link href='/meirongtest/Public/Member/css/frame.css' rel='stylesheet' type='text/css' /> -->

<script type='text/javascript'>
var web_domain='/meirongtest';
var static_domain='/meirongtest';
var img_domain='/meirongtest';
var _PUBLIC_ = '/meirongtest/Public';
var _FILE_ = '<?php echo U('Index/ajaxFileUpload');?>';
var domain={
        www:'<?php echo C('WEB_ABSOLUTE_URL');?>',
        static:'<?php echo C('WEB_ABSOLUTE_URL');?>',
        img:'<?php echo C('WEB_ABSOLUTE_URL');?>',
        file:'<?php echo C('WEB_ABSOLUTE_URL');?>',
        kf:'<?php echo C('WEB_ABSOLUTE_URL');?>'
};
</script>

<script language="javascript">
      $(document).ready(order_obj.order_init); 
      var count= <?php echo ($count); ?>;
</script>

</head>

<body>
	
	
	<div id="iframe_page">
		<div class="iframe_content">
			<div class="r_nav">
				<ul>
					<li class="<?php if((ACTION_NAME) == "order"): ?>cur<?php endif; ?>"><a href="<?php echo U('Order/order');?>">订单列表</a></li>
					<li class="<?php if((ACTION_NAME) == "orderplace"): ?>cur<?php endif; ?>"><a href="<?php echo U('Order/orderPlace');?>">待处理订单列表</a></li>
					<!-- <li class="<?php if((ACTION_NAME) == "orderrefund"): ?>cur<?php endif; ?>"><a href="<?php echo U('Order/orderRefund');?>">待退款订单列表</a></li> -->
				</ul>
			</div>

		
		

			
	
			

	<div id="scratch" class="r_con_wrap">
		<form class="r_con_search_form" id="search_form">
			支付状态：<select name="OrderPay">
			<option value="" selected="selected">--请选择--</option>
				<option value="nopay">未支付</option>
				<option value="pay">已支付</option>
				
			</select>  	
			订单状态：<select name="OrderStatus">
				<option value="" selected="selected">--请选择--</option>
				<option value="placeorder">未接单</option>
				<option value="accepted">已接单</option>
				<option value="start">已出发</option>
				<option value="arrive">已到达</option>
				<option value="servicing">服务中</option>
				<option value="finished">已完成</option>
				<option value="unreview">未评价(完成/离开)</option>
				<option value="review">已评价(完成/离开)</option>
				<option value="cancelled">已取消</option>
			</select>  		
			时间：<input name="Time" value="" type="text" class="form_input" size="20" readonly="readonly">
			<!-- 关键字：<input name="Keyword" value="" type="text" class="form_input" size="20"> -->
					<input type="button" class="search_btn" id="search_btn" value="搜索">
					<input type="button" class="search_btn" id="excel_btn" value="导出">
			<div><input type="checkbox" id="auto_refer"><label for="auto_refer">自动刷新订单</label></div>
			<input type="hidden" id="do_action" value="<?php echo U('Order/orderSearch');?>">
		</form>
		
		<div class="r_con_search_form" id="info_form">
			总订单数：<span id="totalCount"><?php echo ($count["totalCount"]); ?></span>&nbsp;&nbsp;&nbsp;&nbsp;
			待付款数：<span id="nopay"><?php echo ($count["nopay"]); ?></span>&nbsp;&nbsp;&nbsp;&nbsp;
			待服务数：<span id="nofinish"><?php echo ($count["nofinish"]); ?></span>(已出发：<span id="start"><?php echo ($count["start"]); ?></span>&nbsp;&nbsp;已到达：<span id="arrive"><?php echo ($count["arrive"]); ?></span>&nbsp;&nbsp;未开始：<span id="nobegin"><?php echo ($count["nobegin"]); ?></span>&nbsp;&nbsp;服务中：<span id="begin"><?php echo ($count["begin"]); ?></span>)&nbsp;&nbsp;&nbsp;&nbsp;
			已完成数：<span id="finish"><?php echo ($count["finish"]); ?></span>(未评价：<span id="noreview"><?php echo ($count["noreview"]); ?></span>&nbsp;&nbsp;已评价：<span id="review"><?php echo ($count["review"]); ?></span>)&nbsp;&nbsp;&nbsp;&nbsp;
			已取消数：<span id="totalcancel"><?php echo ($count["totalcancel"]); ?> </span>

		</div>
	
	<table class="r_con_table" border="0" cellpadding="5" cellspacing="0" id="order_list">
		<thead>
			<tr>
				<td width="3%">订单编号</td>
				<td width="7%">下单时间</td>
				<td width="10%">会员信息</td>
				<td width="7%">美容项目</td>
				<td width="5%">美容师</td>
				<td width="5%">服务方式</td>
				<td width="5%">联系人</td>
				<td width="5%">服务区域</td>
				<td width="8%">服务地点</td>
				<td width="7%">预约时间</td>
				<td width="5%">付款</td>
				<td width="5%">数量</td>
				<td width="5%">花费总时间</td>
				<td width="5%">支付状态</td>
				<td width="5%">订单状态</td>
				<td class="last" width="10%">操作</td>
			</tr>
		</thead>
		<tbody class="order_list"> 
		<?php if(is_array($orderList)): foreach($orderList as $key=>$vo): ?><tr isread="1" orderid="<?php echo ($vo["id"]); ?>">
			<td align="center"><?php echo ($vo["ordernumber"]); ?></td>
			<td align="center"><?php echo ($vo["createtime"]); ?></td>
			<td align="center"><?php echo ($vo["nickname"]); ?>(<?php echo ($vo["tel"]); ?>)</td>
            <td align="center"><?php echo ($vo["oproject_name"]); ?></td>
            <td align="center"><?php echo ($vo["beauticianname"]); ?></td>
            <td align="center"><?php echo ($vo["type"]); ?></td>
            <td align="center"><?php echo ($vo["linkman"]); ?></td>
            <td align="center"><?php echo ($vo["area"]); ?></td>
           	<td align="center"><?php echo ($vo["address"]); ?></td> 
            <td align="center"><?php echo ($vo["oservice_time"]); ?></td>
            <td align="center"><?php echo ($vo["paymoney"]); ?></td>
            <td align="center"><?php echo ($vo["oproject_data"]); ?></td>
            <td align="center"><?php echo ($vo["pib_time"]); ?>分钟</td>
            <td align="center">
            <?php if($vo['pay'] == '0'): ?><font color="red">待支付</font>
            	<?php elseif($vo['pay'] == '1'): ?>已支付<?php endif; ?>
            </td>
			<td align="center">
            <?php if($vo['status'] == 'placeorder'): ?><font color="red">未接单</font>
            	<?php elseif($vo['status'] == 'accepted'): ?>已接单
            	<?php elseif($vo['status'] == 'start'): ?>已出发
            	<?php elseif($vo['status'] == 'arrive'): ?>已到达
	            <?php elseif($vo['status'] == 'servicing'): ?>服务中
	            <?php elseif((($vo['status'] == 'finished') or ($vo['status'] == 'leave')) AND ($vo['review'] == '0')): ?>未评价
	            <?php elseif((($vo['status'] == 'finished') or ($vo['status'] == 'leave')) AND ($vo['review'] == '1')): ?>已评价  
	          	<?php elseif($vo['status'] == 'cancelled'): ?>已取消<?php endif; ?>
            </td>
            <td mid="<?php echo ($vo["id"]); ?>" pay="<?php echo ($vo["pay"]); ?>">
            	[<a href="<?php echo U('Order/orderView',array('id'=>$vo['id']));?>">查看</a>]
            	<?php if(($vo['status'] == 'placeorder') AND ($vo['pay'] == '1')): ?>[<a href="#accepted" url="<?php echo U('Order/orderChange');?>">接单</a>]<?php endif; ?>
            	<?php if($vo['status'] == 'arrive'): ?>[<a href="#begin" url="<?php echo U('Order/orderChange');?>">开始服务</a>]<?php endif; ?>
            	<?php if($vo['status'] == 'servicing'): ?>[<a href="#finish" url="<?php echo U('Order/orderChange');?>">结束服务</a>]<?php endif; ?>
	            <?php if(($vo['pay'] != '1') AND ($vo['status'] != 'cancelled')): ?>[<a href="#cancel" url="<?php echo U('Order/orderChange');?>">取消</a>]<?php endif; ?>
          		[<a href="#del" url="<?php echo U('Order/orderDel');?>">删除</a>]
          	</td>
          <!--   <a href="<?php echo U('Order/orderView',array('id'=>$vo['id']));?>"><img src="/meirongtest/Public/member/images/ico/view.gif"></a>
            <a href="#del" url="<?php echo U('Order/orderDel');?>"><img src="/meirongtest/Public/member/images/ico/del.gif"></a></td> -->
        </tr><?php endforeach; endif; ?>	</tbody>
	</table>
</div>
<div id="turn_page">
		<?php echo ($page); ?>
	</div>

			
			</div>
			</div>
</body>
</html>